const CryptoJS = require('crypto-js')

const timetamp1 = Date.parse(new Date()) / 1000
var key_v = timetamp1.toString(16) + '' + timetamp1.toString(16)
// function decrypt/encrypt
function encrypt_data(page, t, key_v, data){

    var key = key_v;
    var iv =  key_v;
    var b = CryptoJS.enc.Utf8.parse(key);
    var c = CryptoJS.enc.Utf8.parse(iv);
    var d = CryptoJS.AES.encrypt(data, b, {
        iv: c,
        mode: CryptoJS.mode.CBC,
        padding: CryptoJS.pad.Pkcs7

    });
    var params = {
        "page": page,
        "t": t, 
        "v": d.toString()
    }
    return params
};

let data = '3|847m115,847m114,847m113,847d113,847u113'
console.log(encrypt_data(key_v,data))